:root {
    --primary-color: #409EFF;
    --success-color: #67C23A;
    --warning-color: #E6A23C;
    --danger-color: #F56C6C;
    --info-color: #909399;
    --border-color: #EBEEF5;
    --background-color: #F8F9FA;
    --text-color: #303133;
    --text-color-secondary: #606266;
    --text-color-placeholder: #C0C4CC;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
        Arial, sans-serif;
    background-color: var(--background-color);
    overflow: hidden;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.toolbar {
    padding: 8px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 10;
    height: 48px;
}

.canvas-container {
    position: relative;
    flex: 1;
    width: 100%;
    height: calc(100% - 48px);
    overflow: hidden;
}

.canvas {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    transform-origin: 0 0;
    overflow: auto;
}

.grid-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, #e9ecef 1px, transparent 1px),
        linear-gradient(to bottom, #e9ecef 1px, transparent 1px);
    z-index: 0;
}

.canvas-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.control-group {
    display: flex;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-color-secondary);
}

.control-btn:hover {
    background-color: #f5f7fa;
    color: var(--primary-color);
}

.control-btn.active {
    color: var(--primary-color);
    background-color: #ecf5ff;
}

.minimap {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 200px;
    height: 120px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 100;
}

.minimap-viewport {
    position: absolute;
    border: 2px solid var(--primary-color);
    background-color: rgba(64, 158, 255, 0.1);
    z-index: 1;
}

.sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.category-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color-secondary);
}

.node-list {
    padding: 0 16px;
}

.node-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background-color: #fff;
    border-radius: 4px;
    cursor: move;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.node-item:hover {
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.node-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 12px;
    color: white;
}

.node-text {
    display: flex;
    flex-direction: column;
}

.node-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.node-desc {
    font-size: 12px;
    color: var(--text-color-placeholder);
}